import { createBrowserRouter, Navigate } from 'react-router-dom'
import React from 'react'
import Home from '../component/Home'
import List from '../component/List'
import Add from '../component/Add'
import App from '../App'


const router = createBrowserRouter([

    {
        path: '/',
        element: <App />,
        children: [
            {
                path: '/',
                element: <Navigate to={'/home'} />,

            },
            {
                path: '/home',
                element: <Home />,
                children: [
                    {
                        path: '/home/list',
                        element: <List />,
                    }
                ]
            },
            {
                path: '/add',
                element: <Add />,
            }



        ]
    },


])

export default router